<template>
    <!-- 组件的模板 -->
    <div class="main">
        <div class="withdrawal_status">
            <header class="tc">
                <i class="status_icon db success" :class="status == 1 ? 'success': 'failure' "></i>
                <p class="status_copy ft18 cl333">提现申请{{status == 1 ? '成功' : '失败'}}</p>
                <p class="status_des ft14 clFF6600" v-if="status != 1">{{message}}</p>
                <p class="status_des ft14 cl999" v-else>{{last_pageName}}提现下午5点前提现当日到账，5点后次日到</p>
            </header>
        </div>
        <div class="withdrawal_info bgfff">
            <Labllist :labelcopy="'提现金额'" :des="money"></Labllist>
            <Labllist :labelcopy="'提现账户'" :des="account_des"></Labllist>
        </div>
        <Confimbtn :disablebtn="disablebtn" :copy="copy" @confimtrigger="confimSubimt" :cbfn="cbfn"></Confimbtn>
    </div>
</template>

<script>
    /**
     *  引入工具类库 或 Native API
     *  example : import widget from 'gapi/widget'
     */

    import * as util from 'js/util.js'  
    import cache from 'gapi/cache.js'
    import commonPage from 'clientApi/commonPage.js'  
    // import ApiClientUi from 'clientApi/ApiClientUi.js'
    /**
     *  引入组件 以及 组件接口(Action)
     *  example : import Somecomponents from 'components/Somecomponents/Somecomponents'
     */
    import Labllist from 'components/Labellist/Labellist'
    import Confimbtn from 'components/Confimbtn/Confimbtn'
    /**
     *  组件实例对象
     */
    export default {
        components: {
            Labllist,
            Confimbtn
        },
        data: function(){
            return{
                status:true,
                disablebtn:false,
                copy:'确 定',
                cbfn:'confimtrigger',
                money:'122.00元',
                message:'失败原因：今日次数超过10次，请明日再来',
                status:'',
                account_des:'支付宝  17701336400',
                last_page: '',
                last_pageName: '',

            }
        },
        vuex: {
            getters: {

            },
            actions: {

            }
        },
        methods: {
            /**
             * 初始化
             * @method init
             * @public
             * @return {Null} void
             */
            init (){
                this.account_des = util.getUrddataString('account');
                this.money = util.getUrddataString('amount') + '元';
                this.message = util.getUrddataString('errmsg');
                this.status = util.getUrddataString('status');
                this.last_page = util.getUrddataString('last_pageUrl');
                if(this.last_page == 1){
                    this.last_pageName = "支付宝"
                }else if(this.last_page == 3){
                    this.last_pageName = "银行卡"
                }else if(this.last_page == 2){
                    this.last_pageName = "微信"
                }
            },
            confimSubimt(){
                this.disablebtn = true;
                location.href = "dmsaas://MyWallet"
            }
        },
        created(){
            commonPage.updateTitleBar({
                backAction: 'gotoback',
                leftAction: 'gotoback',  
            })
            window.gotoback = () => {
                location.href = `dmsaas://MyWallet`;
            }
            this.init();
        }
        
    }

    
</script>

<!-- CSS 样式 -->
<!-- <style src="static/css/global.css"></style> -->
<style src="../../static/css/base.css"></style>
<style src="../../static/css/yy_withdrawalStatus.css"></style>



